Part Number Hot Search : 
60GU3 X9408 JRC0581 29K4FK HB1005 UG32F11 CHN217 8ETU04
Product Description
Full Text Search
 

To Download ADMCF326BRZ Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  rev. b information furnished by analog devices is believed to be accurate and reliable. however, no responsibility is assumed by analog devices for its use, nor for any infringements of patents or other rights of third parties that may result from its use. no license is granted by implication or otherwise under any patent or patent rights of analog devices. a admcf326 one technology way, p.o. box 9106, norwood, ma 02062-9106, u.s.a. tel: 781/329-4700 www.analog.com fax: 781/326-8703 ? analog devices, inc., 2002 28-lead flash memory dsp motor controller functional block diagram memory block program rom 4k 24 program flash 4k 24 program ram 512 24 data memory 512 16 vref 6 analog inputs 16-bit three- phase pwm por timer serial port sport 1 9-bit pio 2 8-bit aux pwm watch- dog timer adsp-2100 base architecture data address generators dag 1 dag 2 program sequencer arithmetic units shifter mac alu program memory address data memory address program memory data data memory data 2.5v target applications washing machines, refrigerator compressors, fans, pumps, industrial variable speed drives motor types ac induction motors permanent magnet synchronous motors (pmsm) brushless dc motors (bdcm) features 20 mips fixed-point dsp core single cycle instruction execution (50 ns) adsp-21xx family code compatible independent computational units alu multiplier/accumulator barrel shifter multifunction instructions single cycle context switch powerful program sequencer zero overhead looping conditional instruction execution two independent data address generators memory con?guration 512 24-bit program memory ram 512 16-bit data memory ram 4k 24-bit program memory rom 4k 24-bit program flash memory three independent programmable sectors security lock bit 10k erase/program cycles three-phase 16-bit pwm generator 16-bit center-based pwm generator programmable dead time and narrow pulse deletion edge resolution to 50 ns 150 hz minimum switching frequency double/single duty cycle update mode control programmable pwm pulsewidth special crossover function for brushless dc motors individual enable and disable for each pwm output high frequency chopping mode for transformer coupled gate drives external pwmtrip pin integrated adc subsystem six analog inputs acquisition synchronized to pwm switching frequency internal voltage reference 9-pin digital i/o port bit con?gurable as input or output change of state interrupt support two 8-bit auxiliary pwm timers synthesized analog output programmable frequency 0% to 100% duty cycle two programmable operational modes independent mode/offset mode 16-bit watchdog timer programmable 16-bit internal timer with prescaler double buffered synchronous serial port hardware support for uart emulation integrated power-on reset function options 28-lead soic and pdip packages available
?2? rev. b admcf326especifications (v dd = 5 v  5%, gnd = 0 v, t a = e40  c to +85  c, clkin = 10 mhz, unless otherwise noted.) analog-to-digital converter parameter min typ max unit conditions/comments signal input 0.3 3.5 v v1, v2, v3, vaux0, vaux1, vaux2 resolution 1 12 bits linearity error 2 24 bits zero offset 2 ?0 0 +20 mv channel-to-channel comparator match 2 20 mv comparator delay 600 ns adc high level input current 2 10 av in = 3.5 v adc low level input current 2 ?0 av in = 0.0 v notes 1 resolution varies with pwm switching frequency (double update mode) 78.1 khz = 8 bits, 4.9 khz = 12 bits. 2 2.44 khz sample frequency, v1, v2, v3, vaux0, vaux1, vaux2 speci?ations subject to change without notice. electrical characteristics parameter min typ max unit conditions/comments v il low level input voltage 0.8 v v ih high level input voltage 2 v v ol low level output voltage 1 0.4 v i ol = 2 ma v ol low level output voltage 2 0.8 v i ol = 2 ma v oh high level output voltage 4 v i oh = ?.5 ma i il low level input current 3 ?20 av in = 0 v i il low level input current ?0 av in = 0 v i ih high level input current 4 90 av in = v dd i ih high level input current 10 av in = v dd i ozh high level three-state leakage current 5 90 av in = v dd i ozl low level three-state leakage current 5 ?0 av in = 0 i il low level pwmtrip current ?0 a@ v dd = max, v in = 0 v i dd supply current (idle) 6 41 ma i dd supply current (dynamic) 6 108 ma supply current programming 6 123 ma notes 1 output pins pio0?io8, ah, al, bh, bl, ch, cl 2 xtal pin 3 internal pull-up, reset 4 internal pull-down, pwmtrip , pio0?io8 5 three stateable pins dt1, rfs1, tfs1, sclk1 6 outputs not switching speci?ations subject to change without notice. current source 1 parameter min typ max unit conditions/comments programming resolution 3 bits default current 2 65 83 95 ai const_trim = 0x00 tuned current 95 100 105 a notes 1 for adc calibration 2 0.3 v to 3.5 v iconst voltage speci?ations subject to change without notice.
?3? rev. b admcf326 voltage reference parameter min typ max unit conditions/comments voltage level (v ref )2.40 2.50 2.60 v 2.45 2.50 2.55 v t a = 25 c to 85 c soic output voltage drift 35 ppm/ c speci?ations subject to change without notice. power-on reset parameter min typ max unit conditions/comments reset threshold (v rst ) 3.2 3.7 4.2 v hysteresis (v hyst ) 100 mv reset active timeout period ( t rst ) 3.2 * ms * 2 16 clkout cycles. speci?ations subject to change without notice. flash memory parameter min typ max unit conditions/comments endurance 10,000 cycles cycle = erase/program/verify data retention 15 years program and erase operating temperature 0 85  c read operating temperature ?0 +85  c speci?ations subject to change without notice.
admcf326 ?4? rev. b timing parameters parameter min max unit clock signals signal t ck is de?ed as 0.5 t ckin . the admcf326 uses an input clock with a frequency equal to half the instruction rate; a 10 mhz input clock (equ ivalent to 100 ns) yields a 50 ns processor cycle (equivalent to 20 mhz). when t ck values are within the range of 0.5 t ckin period, they should be substituted for all relevant timing parameters to obtain speci?ation value. example: t ckh = 0.5 t ck ?10 ns = 0.5 (50 ns) ?10 ns = 15 ns. timing requirements: t ckin clkin period 100 150 ns t ckil clkin width low 20 ns t ckih clkin width high 20 ns switching characteristics: t ckl clkout width low 0.5 t ck ?10 ns t ckh clkout width high 0.5 t ck ?10 ns t ckoh clkin high to clkout high 0 20 ns control signals timing requirement: t rsp reset width low 5 t ck * ns pwm shutdown signals timing requirement: t pwmtpw pwmtrip width low t ck ns * applies after power-up sequence is complete speci?ations subject to change without notice. clkin clkout t ckl t ckil t ckh t ckih t ckin t ckoh figure 1. clock signals
?5? rev. b admcf326 parameter min max unit serial ports timing requirements: t sck sclk period 100 ns t scs dr/tfs/rfs setup before sclk low 15 ns t sch dr/tfs/rfs hold after sclk low 20 ns t scp sclk in width 40 ns switching characteristics : t cc clkout high to sclk out 0.25 t ck 0.25 t ck + 20 ns t scde sclk high to dt enable 0 ns t scdv sclk high to dt valid 30 ns t rh tfs/rfs out hold after sclk high 0 ns t rd tfs/rfs out delay from sclk high 30 ns t scdh dt hold after sclk high 0 ns t scdd sclk high to dt disable 30 ns t tde tfs (alt) to dt enable 0 ns t tdv tfs (alt) to dt valid 25 ns t rdv rfs (multichannel, frame delay zero) to dt valid 30 ns speci?ations subject to change without notice. t cc t cc t scs t rd t rh t scdv t scde t scdd t tdv t rdv clkout sclk dr rfs in tfs in rfs out tfs out dt tfs (alternate frame mode) rfs (multichannel mode, frame delay 0 [mfd = 0]) t scp t sck t scp t sch t scdh t tde figure 2. serial port timing
admcf326 ?6? rev. b caution esd (electrostatic discharge) sensitive device. electrostatic charges as high as 4000 v readily accumulate on the human body and test equipment and can discharge without detection. although the admcf326 features proprietary esd protection circuitry, permanent damage may occur on devices subjected to high energy electrostatic discharges. therefore, proper esd precautions are recommended to avoid performance degradation or loss of functionality. warning! esd sensitive device absolute maximum ratings * supply voltage (v dd ) . . . . . . . . . . . . . . . . . . ?.3 v to +7.0 v input voltage . . . . . . . . . . . . . . . . . . . . . ?.3 v to v dd + 0.3 v output voltage swing . . . . . . . . . . . . . . ?.3 v to v dd + 0.3 v flash memory erase or program temperature range (ambient) . . . . . . . . . . . . 0 c to 85 c operating temperature range (ambient) . . . ?0 c to +85 c storage temperature range . . . . . . . . . . . . ?5 c to +150 c lead temperature (5 sec) . . . . . . . . . . . . . . . . . . . . . . . 280 c storage temperature range for soic package . . ?5 c to +150 c storage temperature range for pdip package . . ?0 c to +125 c * stresses greater than those listed under absolute maximum ratings may cause permanent damage to the device. these are stress ratings only; functional operation of the device at these or any other conditions greater than those indicated in the operational sections of this speci?ation is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. ordering guide temperature instruction package package model range rate description option admcf326br ?0 c to +85 c 20 mhz 28-lead wide body (soic) so-28 admcf326bn ?0 c to +85 c 20 mhz 28-lead pdip n-28 admcf326-evalkit development tool kit pin function descriptions pin pin pin no. name type 1 pio6/clkout i/o 2 pio5/rfs1 i/o 3 pio4/dr1a i/o 4 pio3/sclk1 i/o 5 pio2/dr1b i/o 6 pio1/dt1 i/o 7 pio0/tfs1 i/o 8 clkin i 9 xtal o 10 v dd sup 11 pwmtrip i 12 v3 i 13 v2 i 14 v1 i 15 vaux0 i 16 vaux1 i 17 vaux2 i 18 iconst o 19 gnd gnd 20 reset i 21 ch o 22 cl o 23 bh o 24 bl o 25 ah o 26 al o 27 pio8/aux0 i/o 28 pio7/aux1 i/o pin configuration top view (not to scale) 28 27 26 25 24 23 22 21 20 19 18 17 16 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 admcf326 pio6/clkout pio7/aux1 pio5/rfs1 pio8/aux0 pio4/dr1a al pio3/sclk1 ah pio2/dr1b bl pio1/dt1 bh pio0/tfs1 cl clkin ch xtal reset pwmtrip ist 2 2 1 1 0
admcf326 ?7? rev. b general description the admcf 326 is a low cost, single-chip dsp-b ased controller, s uitable for permanent magnet sync hronous motors, ac induction motors, and brushless dc motors. the admcf326 integrates a 20 mips, ?ed-point dsp core with a com plete set of motor control and system peripherals that permits fast, ef?ient de vel- opment of m otor controllers. the dsp core of the admcf326 is the adsp-2171, which is completely code-compatible with the adsp-21xx dsp family and combines three computational units, data add ress generators and a program sequencer. the computational units comprise an a lu, a multiplier/accumulator (mac), and a barrel shifter. the adsp-2171 adds new instructions for bit manipulation, multiplication ( squared), biased rounding, and global inter- rupt masking. th e system peripherals are the power-on reset circuit (por), th e watchdog timer and a synchronous serial port. the serial port is con?urable and double buffered, with hardware support for uart and sci port emulation. the admcf326 provides 512 24-bit program memory ram, 4k 24-bit pro gram memory rom, 4k 24-bit program flash memory, and 512 16-bit data memory ram. the user code will be stored and executed from the flash memory. the program and data memory ram can be used for dynamic data storage or can be loaded through the serial port from an external device as in other admcxxx family parts. the program memory rom contains a monitor function as well as useful rou- tines for erasing, programming, and verifying the flash memory. the motor control peripherals of the admcf326 provide a 12-bit analog data acquisition system with six analog input channels, and an internal voltage reference. in addition, a three-phase, 1 6-bit, center-based pwm generation unit can be used to produce hig h accuracy pwm signals with minimal processor overhead. the admcf326 also contains two auxiliary pwm outputs and nine lines of digital i/o. b ecause the admcf326 has a limited number of pins, functions such as the auxiliary pwm and the serial communication port are multiplexed with the nine programmable input/output (pio) pins. the pin functions can be independently selected to allow maximum flexibility for different applications. pm rom 4k  24 pm ram 512  24 bus exchange companding circuitry data address generator #2 data address generator #1 14 14 24 16 6 dm ram 512  16 r bus 16 dma bus pma bus dmd bus pmd bus instruction register input regs output regs shifter control logic serial port receive reg transmit reg timer input regs output regs mac input regs output regs alu program sequencer flash program memory 4k  24 figure 3. dsp core block diagram
admcf326 ?8? rev. b dsp core architecture overview f igure 3 is an overall block diagram of the dsp core of the admcf326, which is based on the ?ed-point adsp-2171. the flexible architecture and comprehensive instruction set of t he adsp-2171 allow the processor to perform multiple operations in parallel. in one processor cycle (50 ns with a 10 mhz clkin), the dsp core can: ? generate the next program address ? fetch the next instruction ? perform one or two data moves ? update one or two data address pointers ? perform a computational operation this all takes place while the processor continues to: ? receive and transmit through the serial port ? decrement the interval timer ? generate three-phase pwm waveforms for a power inverter ? generate two signals using the 8-bit auxiliary pwm timers ? acquire four analog signals ? decrement the watchdog timer the processor contains three independent computational units: the arithmetic and logic unit (alu), the multiplier/accumulator (mac), and the shifter. the computational units process 16-bit data directly and have provisions to support multiprecision com- putations. the alu performs a standard set of arithmetic and logic operations as well as provides support for division primitives. the mac performs single-cycle multiply, multiply/add, and multiply/subtract operations with 40 bits of accumulation. the s hifter performs logical and arithmetic shifts, normalization, de normalization, and derive-exponent operations. the shifter can be used to ef?iently implement numeric format control, including floating-point representations. the internal result (r) bus directly connects the computational units so that the output of any unit may be the input of any unit on the next cycle. a powerful program sequencer and two dedicated data address generators ensure ef?ient delivery of operands to these compu- tational units. the sequencer supports conditional jumps and subroutine calls and returns in a single cycle. with internal loop counters and loop stacks, the admcf326 executes looped code with zero overhead; no explicit jump instructions are required to maintain the loop. two data address generators (dags) provide addresses for simultaneous dual operand fetches from data memory and pro- gram memory. each dag maintains and updates four address pointers (i registers). whenever the pointer is used to access data ( indirect addressing), it is post-modi?d by the value in one of four modify (m registers). a length value may be associated with ea ch pointer (l registers) to implement automatic modulo ad dressing for circular buffers. the circular buffering feature is also used by the serial ports for automatic data transfers to and fr om on-chip memory. dag1 generates only data memory a ddresses and provides an optional bit-reversal capability. dag2 may generate either program or data memory addresses but has no bit-reversal capability. ef?ient data transfer is achieved with the use of ?e internal buses: ? program memory address (pma) bus ? program memory data (pmd) bus ? data memory address (dma) bus ? data memory data (dmd) bus ? result (r) bus program memory on the admcf326 can either be internal (on-chip ram) or external (flash). internal program memory c an store both instructions and data, permitting the admcf326 to fetch two operands in a single instruction cycle?ne from program mem ory and one from data memory. operation from external program memory is described in detail in the adsp- 2100 family user? manual, third edition . the admcf326 writes data from its 16-bit registers to the 24-bit program memory using the px register to provide the lower eight bits. when it reads data (not instructions) from 24-bit pro- gram memory to a 16-bit data register, the lower eight bits are placed in the px register. t he adm cf326 can respond to a number of distinct dsp core and peripheral interrupts. the dsp interrupts comprise a serial port receive interrupt, a serial port transmit interrupt, a timer interrupt, and two software interrupts. additionally, the motor control peripherals include two pwm interrupts and a pio interrupt. the serial port (sport1) provides a complete synchronous serial interface with optional companding in hardware, and a wide variety of framed and unframed data transmit and receive modes of operation. sport1 can generate an internal program- mable serial clock or accept an external serial clock. a programmable interval counter is also included in the dsp core and can be used to generate periodic interrupts. a 16-bit count register (tcount) is decremented every n processor cycles, where n? is a scaling value stored in the 8-bit tscale register. when the value of the counter reaches zero, an interrupt is generated, and the count register is reloaded from a 16-bit period register (tperiod). the admcf326 instruction set provides flexible data moves and multifunction instructions (one or two data moves within a computation) that will execute from internal program memory ram. the admcf326 assembly language uses an algebraic syntax for ease of coding and readability. a comprehensive set of development tools supports program development. for further information on the dsp core, refer to the adsp-2100 family user? manual, third edition, with particular reference to the adsp-2171.
admcf326 ?9? rev. b serial port the admcf326 incorporates a complete synchronous serial port (sport1) for serial communication and multiprocessor com- munication. the following is a brief list of capabilities of the admcf326 sport1. refer to the adsp-2100 family user? manual, third edition , for further details. ? sport1 is bidirectional and has a separate, double-buffered transmit and receive section. ? sport1 can use an external serial clock or generate its own serial clock internally. ? sport1 has independent framing for the receive and trans- mit sections. sections run in a frameless mode or with frame s ynchronization signals internally or externally generated. frame synchronization signals are active high or inverted, with either of two pulsewidths and timings. ? s port1 supports serial data-word lengths from three bits to 16 bits and provides optional a-law and -law companding ac- cording to itu (formerly ccitt) recommendation g.711. ? sport1 receive and transmit sections can generate unique interrupts on completing a data-word transfer. ? sport1 can receive and transmit an entire circular buffer of data with only one overhead cycle per data-word. an interrupt is generated after a data buffer transfer. ? sport1 can be con?ured to have two external interrupts (irq0 and irq1), and the flag in and flag out signals. t he internally generated serial clock may still be used in this con?uration. ? sport1 has two data receive pins (dr1a and dr1b), which are internally multiplexed onto the one dr1 port of the sport1. the particular data receive pin selected is deter- mined by a bit in the modectrl register. pin function description t he a dmcf326 is available in both 28-lead soic and pdip packages. t able i describes the pins. table i. pin list no. pin group of input/ name pins output function reset 1i processor reset input sport1 * 6 i/o serial port 1 pins (tfs1, rfs1, dt1, dr1a, dr1b, sclk1) clkout * 1o processor clock output clkin, xtal 2 i, o external clock or quartz crystal connection point pio0?io8 * 9 i/o digital i/o port pins aux0?ux1 * 2o auxiliary pwm outputs ah?l 6 o pwm outputs pwmtrip 1i pwm trip signal v1, v2, v3 3 i analog inputs v aux0?aux2 3 i auxiliary analog input iconst 1 o adc constant current source v dd 1 power supply gnd 1 ground * multiplexed pins, individually selec table through pioselect and piodata1 registers. interrupt overview the admcf326 can respond to 16 different interrupt sources w ith minimal overhead, ?e of which are internal dsp core in terrupts and 11 are from the motor control peripherals. the ?e dsp core interrupts are sport1 receive (or irq0 ) and transmit (or irq1 ), the internal timer, and two software interrupts. the motor control peripheral interrupts are the nine program mable i/os and two from the pwm (pwmsync pulse and pw mtrip ). all motor control interrupts are multiplexed into the dsp core through the peripheral irq2 interrupt. the interrupts are inter nally prioritized and individually maskable. a detailed description of the entire interrupt system of the admcf326 is presented later, following a more detailed description of each peripheral block. memory map the admcf326 has two distinct memory types: program memory and data memory. in general, program memory contains user code and coef?ients, while the data memory is used to store variables and data during program execution. three kinds of program memory are provided on the admcf326: ram, rom, a nd flash memory. the motor control peripherals are memory mapped into a region of the data memory space starting at 0x2000. the complete program and data memory maps are given in tables ii and iii, respectively. table ii. program memory map memory address range type function 0x0000?x002f ram internal vector table 0x0030?x01ff ram user program memory 0x0200?x07ff reserved 0x0800?x17ff rom reserved program memory 0x1800?x1fff reserved 0x2000?x20ff flash user program memory sector 0 0x2100?x21ff flash user program memory sector 1 0x2200?x2fff flash user program memory sector 2 0x3000?x3fff reserved table iii. data memory map memory address range type function 0x0000?x1fff reserved 0x2000?x20ff memory mapped registers 0x2100?x37ff reserved 0x3800?x39ff ram user data memory 0x3a00?x3bff ram reserved 0x3c00?x3fff memory mapped registers
admcf326 ?10? rev. b flash memory subsystem the admcf326 has 4k 24-bit of user-programmable, non- volatile flash memory. a flash programming utility is provided with the development tools, which performs the basic device programming operations: erase, program, and verify. t he flash memory array is partitioned into three asymmetrically sized sectors of 256 words, 256 words, and 3584 words, labeled sector 0, sector 1, and sector 2, respectively. these sectors are mapped into external program memory address space. four flash memory interface registers are connected to the dsp. these 16-bit registers are mapped into the register area of data memory space. they are named flash memory control register (fmcr), flash memory address register (fmar), flash memory data register low (fmdrl), and flash memory data register high (fmdrh). these registers are diagrammed later in this data sheet. they are used by the flash memory programming utility. the user program may read these registers, but should not modify them directly. the flash programming utility provides a complete interface to the flash memory. special flash registers t he flash module has four nonvolatile 8-bit registers called special flash registers (sfrs) that are accessible independently of the main flash array via the flash programming utility. these regis- ters are for general-purpose, nonvolatile storage. when erased, the special flash registers contain all 0s. to read special flash registers from the user program, call the read_reg routine con- tained in rom. refer to the admcf32x dsp motor controller developer? reference manual for an example. boot-from-flash code a security feature is available in the form of a code that, when set, c auses the processor to execute the program in flash memory upon power-up or reset. in this mode, the flash programming utility a nd debugger are unable to communicate with the admcf326. consequently, the contents of the flash memory can neither be programmed nor read. the boot-from-flash code may be set via the flash programming utility, when the user? program is thoroughly tested and loaded into flash program memory at address 0x2200. the user? program must contain a mechanism for clearing the boot-from-flash code if reprogramming the flash memory is desired. the only way to clear boot-from-flash is from within the user program, by calling the flash_init or auto_erase_reg routines that are included in t he rom. the user program must be signaled in some way to call th e necessary routine to c lear the boot-from-flash code. an example would be to detect a high level on a pio pin during start-up initial- izat ion and then call the flash_init or auto_erase_r outine. the f lash_init routine will erase the entire user program in flash memory before clearing the boot-from-flash code, thus ensuring t he security of the user program. if security is not a concern, the auto_erase_reg routine can be used to clear the boot-from-flash code while leaving the user program intact. r efer to the admcf32x dsp motor controller developer? reference manual for further instructions and an example of using the boot-from-flash code. flash program boot sequence on power-up or reset, the processor begins instruction execu- t ion at address 0x0800 of internal program rom. the rom monitor program that is located there checks the boot-from- flash code. if that code is set, the processor jumps to location 0x2200 in external flash program memory, where it expects to ?d the user? application program. if the boot-from-flash code is not set, the monitor attempts to boot from an external device as described in the admcf32x dsp motor controller developer? reference manual system interface figure 4 shows a basic system con?uration for the admcf326 with an external crystal. admcf326 xtal clkin 10mhz clkout reset 22 22 s s the admcf326 can be clocked either by a crystal or a ttl- c ompatible clock signal. for normal operation, the clkin input cannot be halted, changed during operation, or operated below the speci?d minimum frequency. if an external clock is used, it should be a ttl-compatible signal running at half the in struction rate. the signal is connected to the clkin pin of the admcf326. in this mode, with an external clock signal, t he xtal pin must be left unconnected. the admcf326 uses an input clock with a frequency equal to half the instruction r ate; a 10 mhz input clock yields a 50 ns processor cycle (which is equivalent to 20 mhz). normally, instructions are executed in a single processor cycle. all device timing is relative to the i nternal instruction rate, which is indicated by the clkout signal when enabled. because the admcf326 includes an on-chip oscillator feedback c ircuit, an external crystal may be used instead of a clock source, as shown in figure 4. the crystal should be connected across the clkin and xtal pins, with two capacitors as shown in figure 4. a parallel-resonant, fundamental frequency, microprocessor -grade crystal should be used. a clock output signal ( clkout) is generated by the processor at the processor? cycle rate of twice the input frequency. reset the admcf326 dsp core and peripherals must be correctly r eset when the device is powered up to assure proper initialization. the admcf326 contains an integrated power-on reset (por) circuit that provides a complete system reset on power-up and p ower-down. the por circuit monitors the voltage on the admcf326 v dd pin and holds the dsp core and peripherals in reset while v dd is less than the threshold voltage level, v rst . when this voltage is exceeded, the admcf326 is held in reset f or an additional 2 16 dsp clock cycles (t rst in figure 5). on p ower-down, when the voltage on the v dd pin falls below v rst ? hyst , the admcf326 will be reset. also, if the external reset p in is actively pulled low at any time after power-up, a complete hardware reset of the admcf326 is initiated.
admcf326 ?11? rev. b v rst v dd reset rst st rst pr the admcf326 reset sets all internal stack pointers to the empty stack condition, masks all interrupts, clears the mstat re gister and performs a full reset of all of the motor control p eriph- erals. following a power-up, it is possible to initiate a dsp core an d motor control peripheral reset by pulling the reset pin low. the reset signal must meet the minimum pulsewidth speci?ation, t rsp . following the reset sequence, the dsp core starts executing code from the internal pm rom l ocated at 0x0800. dsp control registers t he dsp core has a system control register, syscntl, memory mapped at dm (0x3fff). sport1 is con?ured as a serial port when bit 10 is set, or as flags and interrupt lines when this bit is cleared. for proper operation of the admcf326, all other bits in this register must be cleared. the dsp core has a wait state control register, memwait, memory mapped at dm (0x3ffe). the default value of this re sister is 0xffff. for proper operation of the admcf326, th is register must always contain the value 0x8000. the con?uration of both the syscntl and memwait reg- isters of the admcf326 are shown at the end of the data sheet. three-phase pwm controller overview t he pwm generator block of the admcf326 is a flexible, programmable, three-phase pwm waveform generator that can be programmed to generate the required switching patterns to drive a three-phase voltage source inverter for ac induction motors (acim) or permanent magnet synchronous motors (pm sm ). in addition, the pwm block contains special functions that considerably simplify the generation of the required pwm switching patterns for control of electronically commutated motors (ecm) or brushless dc motors (bdcm). the pwm generator produces three pairs of active high pwm s ignals on the six pwm output pins (ah, al, bh, bl, ch, and cl). the six pwm output signals consist of three high side drive signals (ah, bh, and ch) and three low side drive signals (al, bl, and cl). the switching frequency, dead time, and minimum pulsewidths of the generated pwm patterns are programmable using, respectively, the pwmtm, pwmdt, and p wmpd registers. in addition, three registers (pwmcha, pwmchb, and pwmchc) control the duty cycles of the three pairs of pwm signals. each of the six pwm output signals can be enabled or disabled by separate output enable bits of the pwmseg register. in addition, three control bits of the pwmseg register permit crossover of the two signals of a pwm pair for easy control of ecm or bdcm. in crossover mode, the pwm signal destined f or the high side switch is diverted to the complementary low s ide output, and the signal destined for the low side switch is d iverted to the corresponding high side output signal. in many applications, there is a need to provide an isolation barrier in the gate-drive circuits that turn on the power devices of the inverter. in general, there are two common isolation techniques: optical isolation using optocouplers, and transformer isolation using pulse transformers. the pwm controller of the admcf326 permits mixing of the output pwm signals with a high frequency chopping signal to permit an easy interface to such pulse trans- formers. the features of this gate-drive chopping mode can be controlled by the pwmgate register. there is an 8-bit value within the pwmgate register that directly controls the chopping frequency. in addition, high frequency chopping can be indepen- d ently enabled for the high side and the low side outputs using separate control bits in the pwmgate register. the pwm generator is capable of operating in two distinct modes: s ingle update mode or double update mode. in single update mode, the duty cycle values are programmable only once per pwm period, so that the resultant pwm patterns are symmetri- cal about the midpoint of the pwm period. in the double update mode, a second updating of the pwm duty cycle values is imple- mented at the midpoint of the pwm period. in this mode, it is possible to produce asymmetrical pwm patterns that produce lower harmonic distortion in three-phase pwm inverters. this technique also permits the closed-loop controller to change the average voltage applied to the machine winding at a f aster rate, allowing wider closed-loop bandwidths to be achieved. the operat- in g mode of the pwm block (single or double update mode) is selected by a control bit in modectrl register. the pwm generator of the admcf326 also provides an internal signal that synchronizes the pwm switching frequency to the a/d operation. in single update mode, a pwmsync pulse is pr oduced at the start of each pwm period. in double update mode, an additional pwmsync pulse is produced at the mid- point of each pwm period. the width of the pwmsync pulse is programmable through the pwmsyncwt register. t he pwm signals produced by the admcf326 can be shut off in a number of different ways. first, there is a dedicated asynchronous pwm shutdown pin, pwmtrip , which, when br ought lo, instantaneously places all six pwm outputs in t he lo state. because this hardware shutdown mechanism is asynchronous, and the associated pwm disable circuitry does not use clocked logic, the pwm will shut down even if the dsp clock is not running. the pwm system may also be shut down from software by writing to the pwmswt register. status information about the pwm system of the admcf326 is available to the user in the sysstat register. in particular, the state of pwmtrip is available, as well as a status bit that indicates whether operation is in the ?st half or the second half of the pwm period.
admcf326 ?12? rev. b a functional block diagram of the pwm controller is shown in figure 6. the generation of the six output pwm signals on pins ah to cl is controlled by four important blocks: ? the three-phase pwm timing unit, which is the core of the pwm controller, generates three pairs of complemented and dead-time-adjusted center-based pwm signals. ? the output control unit allows the redirection of the outputs of the three-phase timing unit for each channel to either the high side or low side output. in addition, the output control unit allows individual enabling/disabling of each of the six pwm output signals. ? the gate drive unit provides the high chopping frequency and its subsequent mixing with the pwm signals. ? th e pwm shutdown controller manages the two pwm shut- down modes (via the pwmtrip pin, and the pwmswt register) and generates the correct reset signal for the timing unit. ? the pwm controller is driven by a clock at the same frequency as the dsp instruction rate, clkout, and is capable of generating two interrupts to the dsp core. one interrupt is generated on the occurrence of a pwmsync pulse, and the other is generated on the occurrence of any pwm shut- down action. three-phase timing unit the 16-bit three-phase timing unit is the core of the pwm con- troller and produces three pairs of pulsewidth modulated signals with high resolution and minimal processor overhead. there are four main con?uration registers (pwmtm, pwmdt, pw mpd, and pwmsyncwt) that determine the fundamental charac- teristics of the pwm outputs. in addition, the operating mode of the pwm (single or double update mode) is selected by bit 6 of the modectrl register. these registers, in conjunction with t he three 16-bit duty cycle registers (pwmcha, pwmchb, and pwmchc), control the output of the three-phase timing unit. pwm switching frequency: pwmtm register t he pwm switching frequency is controlled by the pwm period register, pwmtm. the fundamental timing unit of the pwm controller is t ck = 1/f clkout, where f clkout, is the clk out f requency (dsp instruction rate). therefore, for a 20 mhz clkout, the fundamental time increment is 50 ns. the value written to the pwmtm register is effectively the n umber of t ck clock increments in half a pwm period. the required pwmtm value is a function of the desired pwm switching frequency ( f pwm ) and is given by: pwmtm f f f f clkout pwm clkin pwm = = 2 therefore, the pwm switching period, t s , can be written as: t pwmtm t sck = 2 pwmtrip r pwmswt0 pwmstwtrer pwmtrip pwmse0 tpt tr it te rie it pwmte reisters pwmirti reisters titerrpt trer treepse pwmtimi it reset s s pwms t pwmte0 pwmtm10 pwmt0 pwmp10 pwmswt0 metr pwm10 pwm10 pwm10 pwmm2
admcf326 ?13? rev. b for example, for a 20 mhz clkout and a desired pwm switching frequency of 10 khz (t s = 100 s), the correct value to load into the pwmtm register is: pwmtm x e = = 20 10 21010 1000 0 3 8 6 3 the largest value that can be written to the 16-bit pwmtm register is 0x ffff = 65,535, which corresponds to a minimum pwm switching frequency of: fhz pwm ,min , = = 20 10 265 535 153 6 for a clkout frequency of 20 mhz. pwm switching dead time: pwmdt register the second important pwm block parameter that must be initialized is the switching dead time. this is a short delay time introduced between turning off one pwm signal (for example ah) and turning on its complementary signal (al). this short t ime delay is introduced to permit the power switch being turned o ff to completely recover its blocking capability before the complementary switch is turned on. this time delay prevents a potentially destructive short circuit condition from developing across the dc link capacitor of a typical voltage source inverter. d ead time is controlled by the pwmdt register. the dead time is inserted into the three pairs of pwm output signals. the dead time, t d , is related to the value in the pwmdt register by: t pwmdt t pwmdt f dck clkout == 22 therefore, a pwmdt value of 0x00a (= 10), introduces a 1 s delay between the turn-off of any pwm signal (for example ah) and the turn-on of its complementary signal (al). the amount of the dead time can therefore be programmed in increments of 2 t ck (or 100 ns for a 20 mhz clkout). the pwmdt reg ister is a 10-bit register. for a clkout rate of 20 mhz, its max imum v alue of 0x3ff (= 1023) corresponds to a maximum programmed dead time of: t dmax = 1023 2 t ck = 1023 2 50 10 ? sec = 102 s th e dead time can be programmed to zero by writing 0 to the pwmdt register. pwm operating mode: modectrl and sysstat registers the pwm controller of the admcf326 can operate in two dis- tinct modes: single update mode and double update mode. t he o perating mode of the pwm controller is determined by th e state of bit 6 of the modectrl register. if this bit is cleared, the pwm operates in the single update mode. setting bit 6 p laces the pwm in the double update mode. by default, following e ither a peripheral reset or power-on, bit 6 of the modectrl register is cleared. this means that the default operating mode is single update mode. in single update mode, a single pwmsync pulse is produced in each pwm period. the rising edge of this signal marks th e s tart of a new pwm cycle and is used to latch new values from the pwm con?uration registers (pwmtm, pwmdt, pwmpd, and pwmsyncwt) and the pwm duty cycle registers (pwmcha, pwmchb, and pwmchc) into the three-phase timing unit. the pwmseg register is also latched i nto the output control unit on the rising edge of the pwmsync p ulse. in effect, this means that the parameters of the pwm signals can be updated only once per pwm period at the start of each cycle. thus, the generated pwm patterns are symmetrical about the midpoint of the switching period. in double update mode, there is an additional pwmsync pulse produced at the midpoint of each pwm period. the rising edge of this new pwmsync pulse is again used to latch new values of the pwm con?uration registers, duty cycle registers, and the p wmseg register. as a result, it is possible to alter both the characteristics (switc hing frequency, dead time, min imum pulse- w idth and pwmsync pulsewidth) and the output duty cycles at the midpoint of each pwm cycle. consequently, it is pos- sible to produce pwm switching patterns that are no longer symmetrical about the midpoint of the period (asymmetrical pwm patterns). in the double update mode, operation in the ?st half or the sec ond half of the pwm c ycle is indicated by bit 3 of the sysstat register. in double update mode, this bit is cleared during operation in the ?st half of each pwm period (between the rising edge of the original pwmsync pulse and the rising e dge of the new p wmsync pulse, which is introduced in d ouble update mode). bit 3 of the sysstat register is set d uring the second half of each pwm period. if required, a user may determine the status of this bit during a pwmsync inter- rupt service routine. the advantages of the double update mode are that lower har- monic voltages can be produced by the pwm process and wider control bandwidths are possible. however, for a given pwm switching frequency, the pwmsync pulses occur at twice the rate in the double update mode. because new duty cycle values must be computed in each pwmsync interrupt service routine, there is a larger computational burden on the dsp in the double update mode. width of the pwmsync pulse: pwmsyncwt register the pwm controller of the admcf326 produces an internal p wm synchronization pulse at a rate equal to the pwm switching f requency in single update mode, and at twice the pwm frequency in the double update mode. this pwmsync synchronizes the operation of the pwm unit with the a/d converter system. the width of this pwmsync pulse is programmable by the pwmsyncwt r egister. the width of the pwmsync pulse, t pwmsync , is given by: tt pwmsyncwt pwmsync ck = + () 1 which means that the width of the pulse is programmable from t ck to 256 t ck (corresponding to 50 ns to 12.8 s for a clkout rate of 20 mhz). following a reset, the pwmsyncwt register con- t ains 0x27 (= 39) so that the default pwmsync width is 2.0 s. pwm duty cycles: pwmcha, pwmchb, pwmchc registers t he duty cycles of the six pwm output signals are controlled by t he three duty cycle registers, pwmcha, pwmchb, and p wmchc. the integer value in the register pwmcha controls th e duty cycle of the signals on ah and al. pwmchb controls the duty cycle of the signals on bh and bl, and pwmchc controls the duty cycle of the signals on ch and cl. the duty cycle registers are programmed in integer counts of the funda- m ental time unit, t ck , and de?e the desired on-time of the high side pwm signal produced by the three-phase timing unit
admcf326 ?14? rev. b over half the pwm period. the switching signals produced by the three-phase timing unit are also adjusted to incorporate the programmed dead time value in the pwmdt register. t he pwm is center-based. this means that in single update mode the resulting output waveforms are symmetrical and centered in the pwmsync period. figure 7 presents a typical pwm tim- ing diagram illustrating the pwm-related registers?(pwmcha, p wmtm, pwmdt, and pwmsyncwt) control over the waveform timing in both half cycles of the pwm period. the magnitude of each parameter in the timing diagram is determined by multiplying the integer value in each register by t ck (typically 50 ns). it may be seen in the timing diagram how dead time is incorporated into the waveforms by moving the switching edges away from the instants set by the pwmcha r egister. pwmcha 2  pwmdt pwmsyncwt + 1 pwmcha pwmtm pwmtm ah al pwmsync sysstat (3) 2  pwmdt figure 7. typical pwm outputs of three-phase timing unit in single update mode each swit ching edge is moved by an eq ual amount (pwmdt t ck ) to preserve the symmetrical output patterns. the pwmsync p ulse, whose width is set by the pwmsyncwt register, is also shown. bit 3 of the sysstat register indicates which half cycle is active. this can be useful in double update mode, as will be discussed later. the resultant on-times of the pwm signals shown in figure 7 may be written as: t pwmcha pwmdt t t pwmtm pwmcha pwmdt t ah ck al ck = = 2 2 () ( ) the corresponding duty cycles are: d t t pwmcha pwmdt pwmtm d t t pwmtm pwmcha pwmdt pwmtm ah ah s al al s == == o bviously, negative values of t ah and t al are not permitted because the minimum permissible value is zero, corresponding to a 0% duty cycle. in a similar fashion, the maximum value is t s , corresponding to a 100% duty cycle. the output signals from the timing unit for operation in double u pdate mode are shown in figure 8. this illustrates a completely general case where the switching frequency, dead time, and duty cycle are all changed in the second half of the pwm period. of course, the same value for any or all of these quantities could be used in both halves of the pwm cycle. however, it can be seen th at there is no guarantee that symmetrical pwm signals will be produced by the timing unit in this double update mode. addi tionally, it is seen that the dead time is inserted into the pwm signals in the same way as in the single update mode. pwmcha 2 pwmsyncwt 2 + 1 pwmcha 1 pwmtm 1 pwmtm 2 pwmsyncwt 1 + 1 ah al pwmsync sysstat (3) 2  pwmdt 1 2  pwmdt 2 figure 8. typical pwm outputs of three-phase timing unit in double update mode in general, the on-times of the pwm signals in double update mode are de?ed by: t pwmcha pwmcha pwmdt pwmdt t ah ck =+?? () 1212 t pwmtm pwmtm pwmcha pwmcha pwmdt pwmdt t al ck = +? ? ?? ? ? ? ? ? ? 12 1 212 where the subscript 1 refers to the value of that register during the ?st half cycle and the subscript 2 refers to the value during the second half cycle. the corresponding duty cycles are: d t t pwmcha pwmcha pwmtm pwmtm pwmdt pwmdt pwmtm pwmtm d t t pwmtm pwmtm pwmcha pwmtm pwmtm pwmcha pwmdt pwmdt pwmtm pwmtm ah ah s al al s = = + + ? + + = = ++ () + ++ () + 12 12 12 12 12 1 12 212 12 because for the completely general case in double update mode, the switching period is given by: tpw mtm pwmtm t sck =+ () 12 again, the values of t ah and t al are constrained to lie between zero and t s . pwm signals similar to those illustrated in figure 7 and figure 8 can be produced on the bh, bl, ch, and cl outputs by pro- gramming the pwmchb and pwmchc registers in a manner identical to that described for pwmcha. the pwm controller does not produce any pwm outputs until all of the pwmtm, pwmcha, pwmchb, and pwmchc registers have been written to at least once. after these registers have been written, the counters in the three-phase timing unit
admcf326 ?15? rev. b are enabled. writing to these registers also starts the main pwm timer. if during initialization, the pwmtm register is written before the pwmcha, pwmchb, and pwmchc registers, the ?st pwmsync pulse (and interrupt if enabled) will be gener- ated (1.5 t ck pwmtm) seconds after the initial write to the pwmtm register in single update mode. in double update mode, the ?st pwmsync pulse will be generated (t ck pwmtm) seconds after the initial write to the pwmtm register in single update mode. effective pwm resolution in single update mode, the same values of pwmcha, pwmchb, and pwmchc are used to de?e the on-times in both half cycles of the pwm period. as a result, the effective resolution of the pwm generation process is 2 t ck (or 100 ns for a 20 mhz clkout) since incrementing one of the duty cycle registers by one chan ges the resultant on-time of the associated pwm signals by t ck in each half period (or 2 t ck for the full period). in double update mode, improved resolution is possible since different values of the duty cycle registers are used to de?e the on-times in both the ?st and second halves of the pwm period. as a result, it is possible to adjust the on-time over the whole period in increments of t ck . this corresponds to an effective pwm resolution of t ck in double update mode (or 50 ns for a 20 mhz clkout). the achievable pwm switching frequency at a given pwm resolution is tabulated in table iv. table iv. achievable pwm resolution in single and double update modes resolution single update mode double update mode (bit) pwm frequency (khz) pwm frequency (khz) 8 39.1 78.1 9 19.5 39.1 10 9.8 19.5 11 4.9 9.8 12 2.4 4.9 minimum pulsewidth: pwmpd register in many power converter switching applications, it is desirable to eliminate pwm switching pulses shorter than a certain width. it takes a ?ite time to both turn on and turn off modern pow er s emiconductor devices. therefore, if the width of any of the pwm pulses is shorter than some minimum value, it may be desirable to completely eliminate the pwm switching for that particular cycle. t he allowable minimum on-time for any of the six pwm outputs f or half a pwm period that can be produced by the pwm control- l er may be programmed using the pwmpd register. the minimum on- time is programmed in increments of t ck so that the minimum o n-time produced for any half pwm period, t min , is related to the value in the pwmpd register by: tp wmpd t min ck = a pwmpd value of 0x002 de?es a permissible minimum on-time of 100 ns for a 20 mhz clkout. in each half cycle of the pwm, the timing unit checks the on- time of each of the six pwm signals. if any of the times is found to be less than the value speci?d by the pwmpd register, the c orresponding pwm signal is turned off for the entire half p eriod, and its complementary signal is turned completely on. consider the example where pwmtm = 200, pwmcha = 5, pwmdt = 3, and pwmpd = 10 w ith a clkout of 20 mhz, while operating in single update mode. for this case, the pwm switching frequency is 50 khz and the dead time is 300 ns. the minimum permissible on-time of any pwm signal over one-half of any period is 500 ns. clearly, for this example, the dead-time adjusted on-time of the ah signal for one-half a pwm period is (5?) 50 ns = 100 ns. because this is less than the minimum p ermissible value, output ah of the timing unit will remain off (0% duty cycle). additionally, the al signal will be turned on for the entire half period (100% duty cycle). output control unit: pwmseg register the operation of the output control unit is managed by the 9-bit r ead/write pwmseg register. this register sets two distinct features of the ou tput control unit that are directly useful in the control of ecm or bdcm. the pwmseg register contains three crossover bits, one for each p air of pwm outputs. setting bit 8 of the pwmseg register enables the crossover mode for the ah/al pair of pwm signals; setting bit 7 enables crossover on the bh/bl pair of pwm s ignals; and setting bit 6 enables crossover on the ch/cl pair of pwm signals. if crossover mode is enabled for any pair of pwm signals, the high side pwm signal from the timing unit (for example ah) is diverted to the associated low side output of the output control unit so that the signal will ultimately appear at the al pin. of course, the corresponding low side output of the timing unit is also diverted to the complementary hi gh side output of the output control unit so that the signal appears at pin ah. following a reset, the three crossover bits are cleared so that the crossover mode is disabled on all three pairs of pwm signals. the pwmseg register also contains six bits (bits 0 to 5) that can be used to individually enable or disable each of the six pwm outputs. if the associated bit of the pwmseg register is set, the corresponding pwm output is disabled regardless of the value of the corresponding duty cycle register. this pwm output signal will remain in the off state as long as the corresponding enable/disable bit of the pwmseg register is set. the pwm output enable function gates the crossover function. a fter a reset, all six enable bits of the pwmseg register are cleared, thereby enabling all pwm outputs by default. in a manner identical to the duty cycle registers, the pwmseg is latched on the rising edge of the pwmsync signal so that changes to this register only become effective at the start of each pwm cycle in single update mode. in double update mode, the pwmseg register can also be updated at the midpoint of the pwm cycle. in the co ntrol of an ecm, only two inverter legs are swit ched at a ny time, and often the high side device in one leg must be switched on at the same time as the low side driver in a se cond l eg. therefore, by programming identical duty cycles for two pwm channels (for example, let pwmcha = pwmchb) and setting bit 7 of the pwmseg register to crossover the bh/bl pair of pwm signals, it is possible to turn on the high side s witch of phase a and the low side switch of phase b at the
admcf326 ?16? rev. b same time. in the control of an ecm, one inverter leg (phase c in this example) is disabled for a number of pwm cycles. this disable may be implemented by disabling both the ch and cl pwm outputs by setting bits 0 and 1 of the pwmseg register. th is is illustrated in figure 9, where it can be seen that both the ah and bl signals are identical, because pwmcha = pwmchb, and the crossover bit for phase b is set. in addition, the other four signals (al, bh, ch, and cl) have been dis abled by setting the appropriate enable/disable bits of the pwmseg register. for the situation illustrated in figure 9, the appropri- ate value for the pwmseg register is 0x00a7. in ecm operation, because each inverter leg is disabled for certain periods of time, t he pwmseg register is changed based upon the position of the rotor shaft (motor commutation). ah al bh bl ch cl pwmtm pwmtm pwmcha = pwmchb pwmcha = pwmchb 2  pwmdt 2  pwmdt figure 9. an example of pwm signals suitable for ecm control. pwmcha = pwmchb, bh/bl are a crossover pair. al, bh, ch, and cl outputs are disabled. operation is in single update mode. gate drive unit: pwmgate register the gate drive unit of the pwm controller adds features that simplify the design of isolated gate drive circuits for pwm in verters. if a transformer-coupled power device gate drive ampli- ? r is used, the active pwm signal must be chopped at a high frequency. the pwmgate register allows the programming of this high frequency chopping mode. the chopped active pwm si gnals may be required for the high side drivers only, for the low side drivers only, or for both the high side and low side sw itches. therefore, independent control of this mode for both high and low side switches is included with two separate control bits in the pwmgate register. ty pi c al pwm output signals with high frequency chopping e nabled on both high side and low side signals are shown in figure 10. chopping of the high side pwm outputs (ah, bh, and ch) is enabled by setting bit 8 of the pwmgate register. c hopping of the low side pwm outputs (al, bl, and cl) is enabled by setting bit 9 of the pwmgate register. the high chopping frequency is controlled by the 8-bit word (gdclk) w ritten to bits 0 to 7 of the pwmgate register. the period and the frequency of this high frequency carrier are: t gdclk t f f gdclk chop ck chop clkout = + () [] = + () [] 41 41 the gdclk value may range from 0 to 255, corresponding to a programmable chopping frequency rate from 19.5 khz to 5 mhz for a 20 mhz clkout rate. the gate drive features must be programmed before operation of the pwm controller and typically are not changed during normal operation of the pwm controller. following a reset, by default, all bits of the pwmgate reg ister are cleared so that high frequency chopping is disabled. pwmtm pwmtm [4  (gdclk+1)  t ck ] 2  pwmdt 2  pwmdt pwmcha pwmcha figure 10. typical pwm signals with high frequency gate chopping enabled on both high side and low side switches (gdclk is the integer equivalent of the value in bits 0 to 7 of the pwmgate register.) pwm shutdown in the event of external fault conditions, it is essential that the pwm system be instantaneously shut down. two methods of sensing a fault condition are provided by the admcf326. for t he ?st method, a low level on the pwmtrip pin initiates an instantaneous, asynchronous (independent of dsp clock) shutdown of the pwm controller. this places all six pwm outputs in the off state, disables the pwmsync pulse and associated i nterrupt signal, and generates a pwmtrip interrupt signal. the pwmtrip pin has an internal pull-down resistor so that even if the pin becomes disconnected, the pwm outputs will be disabled. the state of the pwmtrip pin can be read from bit 0 of the sysstat register. it is possible through software to initiate a pwm shutdown by writing to the 1-bit read/write pwmswt register (0x2061). writing to this bit generates a pwm shutdown in a manner identical to the pwmtrip pin. following a pwm shutdown, it is possible to determine if the shutdown was generated from hardware or software by reading the same pwmswt register. reading this register also clears it.
admcf326 ?17? rev. b restarting the pwm after a fault condition is detected requires clearing the fault and reinitializing the pwm. clearing the fault requires that pwmtrip returns to a hi state. after the fault has been cleared, the pwm can be restarted by writing to registers pwmtm, pwmcha, pwmchb, and pwmchc. a fter the fault is cleared and the pwm registers are initialized, internal t iming of t he three-phase tim ing unit will resume, and the new duty cycle values will be latched on the next rising edge of pwmsync. pwm registers the con?uration of the pwm registers is described at the end of the data sheet. the parameters of the pwm block are tabu- lated in table v. adc overview the adc of the admcf326 is based upon the single slope c onversion technique. this approach offers an inherently monotonic conversion process within the noise and stability of its components, and there will be no missing codes. table vi. adc auxiliary channel selection modectrl (1) modectrl (0) select adcmux1 adcmux0 vaux0 0 0 vaux1 0 1 vaux2 1 0 calibration (v ref )1 1 t he single slope technique has been adapted on the admcf326 for four channels that are simultaneously converted. refer to figure 11 for the functional schematic of the adc. three of the main inputs (v1, v2, and v3) are directly connected as high im pedance voltage inputs. the fourth chan nel has been con- ?ured with a s erially-connected 4-to-1 multiplexer. table vi sho ws the multiplexer input selection codes. one of these auxil- iary mult iplexed channels is used to calibrate the ramp against the internal vol tage reference (v ref ). vaux0 v2l vauxl pwmsync (convst) adc registers v1l v3l v2 (cap reset) clk modectrl<7> 12-bit adc timer block vref comp adc reg isters adc1 adc2 adc3 adcaux modectrl<0..1> external charging cap v c iconst iconst_trim<2:0> vaux1 vaux2 comp comp comp v1 c gnd 4? mux v3 figure 11. adc overview comparing each adc input to a reference ramp voltage and timing the comparison of the two signals performs the conversion process. the actual conversion point is the time point inter- s ection of the input voltage and the ramp voltage (v c ) as shown in figure 12. this time is converted to counts by the 12-bit adc timer block and is stored in the adc registers. the ramp voltage used to perform the conversion is generated by driving a ?ed current into an off-chip capacitor, where the capacitor voltage is vict c = () fol lowing reset, v c = 0 at t = 0. this reset and the start of the conversion process are initiated by the pwmsync pulse, as shown in figure 12. the width of the pwmsync pulse is controlled by the pwmsyncwt register and should be pro- grammed according to figure 13 to ensure complete resetting. in order to compensate for ic process manufacturing tolerances (an d to adjust for capacitor tolerances), the current source of the admcf326 is software program mable. the so ftware setting of the ma gnitude of the iconst c urrent generator is accomplished by se lecting one of eight steps over approximately 20% current range. table v. fundamental characteristics of pwm generation unit of admcf326 16-bit pwm timer parameter min typ max unit counter resolution 16 bits edge resolution (single update mode) 100 ns edge resolution (double update mode) 50 ns programmable dead time range 0 100 s programmable dead time increments 100 ns programmable pulse deletion range 0 100 s programmable pulse deletion increments 100 ns pwm frequency range 150 hz pwmsync pulsewidth (t crst ) 0.05 12.5 s gate drive chop frequency range 0.02 5 mhz
admcf326 ?18? rev. b v1 pwmsync v vil comparator output t t crst t pwm et crst t vil v c v cmax figure 12. analog input block operation t he adc system consists of four comparators and a single timer, which may be clocked at either the dsp rate or half the dsp rate, depending on the setting of the adccnt bit (bit 7) of the modectrl register. when this bit is cleared, the timers c ount at a slower rate of clkin. when this bit is set, they count at clkout or twice the rate of clkin. adc1, adc2, adc3, a nd adcaux are the registers that capture the conversion times, which are effectively the timer values, when the associated comparator trips. charging capacitor ?nf 200 0 010 decimal counts 100 150 50 2468 figure 13. pwmsyncwt program value adc resolution the adc is intrinsically linked to the pwm block through the pwmsync pulse controlling the adc conversion process. because of this link, the effective resolution of the adc is a function of both the pwm switching frequency and the rate at which the adc c ounter timer is clocked. for a clkout period of t ck and a pwm period of t pwm , the maximum count of the adc is given by: max count t pwm t crst t ck for modectrl bit =? () ? ? ? ? = min 4095 2 71 , max count t pwm t crst t ck for modectrl bit =? () ? ? ? ? = min , 4095 71 where t pwm is equal to the pwm period if operating in single update mode, or it is equal to half that period if operating in double update mode. for an assumed clkout frequency of 20 mhz and pwmsync pulsewidth of 2.0 s, the effective resolution of the adc block is tabulated for various pwm switching frequencies in table vii. table vii. adc resolution examples pwm modectrl[7] = 0 modectrl[7] = 1 frequency max effective max effective (khz) count resolution count resolution 2.4 4095 12 4095 12 4 2480 >11 4095 12 8 1230 >10 2460 >11 18 535 >9 1070 >10 25 380 >8 760 >9 charging capacitor selection the charging capacitor value is selected based on the sample (pwm) frequency desired. a too-small capacitor value will reduce the available resolution of the adc by having the ramp v oltage rise rapidly and convert too quickly, not utilizing all pos sible counts available in the pwm cycle. too large a capacitor may not convert in the available pwm cycle returning 0x000. to s elect a charging capacitor, use figure 14, select the sampling frequency desired, determine if the current source is to be tuned to a nominal 100 a or left in the default (0x0 code) trim state, then determine the proper charge capacitor off the appropriate curve. frequency ?khz 100 1 1 100 10 c nom ?nf 10 tuned iconst default iconst figure 14. timing capacitor selection programmable current source the admcf326 has an internal current source that is used to charge an external capacitor, generating the voltage ramp used for conversion. the magnitude of the output of the current s ource circuit is subject to manufacturing variations and can vary from one device to the next. therefore, the admcf326 incudes a programmable current source whose output can always be tuned to within 5% of the target 100 a. a 3-bit register, iconst_trim, allows the user to make this adjustment. the output current is proportional to the value written to the regis- ter: 0x0 produces the minimum output, and 0x7 produces the maximum output. the default value of iconst_trim after reset is 0x0.
admcf326 ?19? rev. b adc reference ramp calibration the peak of the adc ramp voltage should be as close as p ossible to 3.5 v to achieve the optimum adc resolution and signal range. when the current source is in the default state, the peak of the adc ramp slope will be lower than this ?.5 v?target ramp. when the current source value is increased, the adc ramp slope will become closer to the target value. the ?uned?ramp slope is the one closest to the target ramp. a simple calibration procedure using the internal 2.5 v reference voltage allows the selection of the iconst_trim register value to reach this: 1. a high quality linear adc capacitor is selected using figure 14 for a tuned iconst. 2. program pwmsyncwt to proper count as in figure 13. 3. the adc max count is calculated, as described in a previ- ous section. 4. the target reference conversion is calculated as target = (max count) (2.5 v/3.5 v). 5. reset or software sets the iconst_trim register to zero. 6. select calibration channel in software on adc multiplexer. 7. t he calibration channel value is compared with the target reference conversion. 8. if this value is greater than the target, the iconst_trim v alue is incremented by one, and step 7 is repeated. 9. if the calibration channel value is less than the target, the calibration is completed. v ref 3.5v 0.3v minimum ramp target ramp figure 15. current ramp adc registers the con?uration of all registers of the adc system is shown at the end of the data sheet. auxiliary pwm timers overview the admcf326 provides two variable frequency, variable duty cycle, 8-bit, auxiliary pwm outputs that are available at the aux1 a nd aux0 pins when enabled. these auxiliary pwm outputs can be used to provide switching signals to other circuits in a t ypical motor control system such as power factor corrected front end converters or other switching power converters. alter- n atively, by addition of a suitable ?ter network, the auxiliary pwm output signals can be used as simple single-bit digital-to- analog converters. the auxiliary pwm system of the admcf326 can operate in two different modes: independent mode or offset mode. the oper ating mode of the auxiliary pwm system is controlled by bit 8 of the modectrl register. setting bit 8 of the modectrl reg ister places the auxiliary pwm system in the independent mode. in this mode, the two auxiliary pwm generators are completely in dependent, and separate switching frequencies and duty cycles may be programmed for each auxiliary pwm output. in this m ode, the 8-bit auxtm0 register sets the switching frequency of the signal at the aux0 output pin. similarly, the 8-bit auxtm1 register sets the switching frequency of the signal at the aux1 pin. the fundamental time increment for the auxiliary pwm outputs is twice the dsp instruction rate (or 2 t ck ) and the correspond- ing switching periods are given by: t auxtm t aux ck 0 201 = + () t auxtm t aux ck 1 211 = + () since the values in both auxtm 0 and auxtm 1 can ra nge from 0 to 0xff, the achievable switching frequency of the auxiliary pwm signals may range from 39.1 khz to 10 mhz for a clkout frequency of 20 mhz. the on-time of the two auxiliary pwm signals is programmed by the two 8-bit auxch0 and auxch1 registers, according to: t auxtm t on aux ck , 0 20 = () t auxtm t on aux ck , 1 21 = () so that output duty cycles from 0% to 100% are possible. duty cycles of 100% are produced if the on-time value exceeds the period value. typical auxiliary pwm waveforms in independent mode are shown in figure 16(a). when bit 8 of the modectrl register is cleared, the auxil- iary pwm channels are placed in offset mode. in offset mode, the switching frequencies of the two signals on the aux0 and aux1 pins are identical and controlled by auxtm0 in a man- ner similar to that previously described for independent mode. in addition, the on times of both the aux0 and aux1 signals are controlled by the auxch0 and auxch1 registers as be- fore. however, in this mode the auxtm1 register de?es the offset time from the rising edge of the signal on the aux0 pin to that on the aux1 pin according to: t auxtm t offset ck = + () 211 for correct operation in this mode, the value written to the a uxtm1 register must be less than the value written to the auxtm0 register. typical auxiliary pwm waveforms in offset mode are shown in figure 16(b). again, duty cycles from 0% to 100% are possible in this mode. in both operating modes, the resolution of the auxiliary pwm system is eight bits only at the minimum switching frequency (auxtm0 = auxtm1 = 255 in independent mode, auxtm0 = 255 in offset mode). obviously, as the switching frequency is increased, the resolution is reduced. values can be written to the auxiliary pwm registers at any time. however, new duty cycle values written to the auxch0 and auxch1 registers only become effective at the start of the next cycle. writing to the auxtm0 or auxtm1 registers causes the internal timers to be reset to 0 and new pwm cycles to begin.
admcf326 ?20? rev. b by default following a reset, bit 8 of the modectrl register is cleared, thus enabling offset mode. in addition, the registers a uxtm0 and auxtm1 default to 0xff, corresponding to the minimum switching frequency and zero offset. the on-time registers auxch0 and auxch1 default to 0x00. auxiliary pwm interface, registers and pins the registers of the auxiliary pwm system are summarized at the end of the data sheet. aux0 aux1 2  (auxtm0 + 1) 2  (auxtm1 + 1) 2  auxch1 2  auxch1 2  auxch0 (a) independent mode aux0 aux1 2  (auxtm1 + 1) 2  (auxtm0 + 1) 2  auxch0 2  (auxtm0 + 1) 2  auxch1 (b) offset mode figure 16. typical auxiliary pwm signals. (all times in increments of t ck ) pwm dac equation the auxiliary pwm output can be ?tered in order to produce a low frequency analog signal between 0 v to v dd . for example, a 2-p ole ?ter with a 1.2 khz cutoff frequency will suf?iently att enuate the pwm carrier. figure 17 shows how the ?ter would be applied. c1 c2 r1 r2 r1 = r2 = 13k  c1 = c2 = 10nf auxpwm figure 17. auxiliary pwm output filter watchdog timer the admcf326 incorporates a watchdog timer that can per- form a full reset of the dsp and motor control peripherals in the e vent of software error. the watchdog timer is enabled by writing a ti meout value to the 16-bit wdtimer register. the timeout value represents the number of clkin cycles required for the w atchdog timer to count down to zero. when the watchdog timer reaches zero, a full dsp core and motor control peripheral reset is performed. in addition, bit 1 of the sysstat register is set so that after a watchdog reset, the admcf326 can determine th at the reset was due to the timeout of the watchdog timer and not an external reset. following a watchdog reset, bit 1 of the s ysstat register may be cleared by writing zero to the wdtimer register. this clears the status bit but does not en able the watchdog timer. on reset, the watchdog timer is disabled and is only enabled when the ?st timeout value is written to the wdtimer register. to prevent the watchdog timer from timing out, the user must write to the wdtimer register at regular intervals (shor ter than the programmed wdtimer period value). on all but the ?st write to wdtimer, the particular value written to the register is unimportant since writing to wdtimer simply reloads the ?st value written to this register. programmable digital input/output the admcf326 has nine programmable digital input/output (pio) pins that are all multiplexed with other functions. the nine pio lines pio0?io8 are multiplexed with the serial port (pins p io0/tfs1 to pio5/rfs1), the clkout (pin pio6/clkout), and the auxiliary pwm outputs (pins pio7/aux1 and pio8/ aux0). when con?ured as a pio, each of these nine pins can act as an input, output, or an interrupt source. the operating mode of pins pio0/tfs1 to pio7/aux1 is con- trolled by the pioselect register. this 8-bit register has a bit for each input so that the mode of each pin may be selected indi- vidually. bit 0 of pioselect controls the operation of the pio0/tfs1 pin. bit 1 controls the pio1/dt1 pin, etc. setting the appropriate bit in the pioselect register causes the corre- sponding pin to be con?ured for pio functionality. clearing the bit selects the alternate (sport, clkout, or auxpwm) mode of the corresponding pin. following power-on reset, all bits of pioselect are set such that pio functionality is se l ect ed. the operating mode of the pio8/aux0 pin is selected by bit 1 of the piodata1 register. in a manner identical to the pioselect register, setting this bit enables pio functionality (pio8) while clearing the bit enables auxiliary pwm func- tionality (aux0). once pio functionality has been selected for any or all of these nine pins, the direction may be set by the 8-bit piodir0 regis- ter (for pio0 to pio7) and the 1-bit piodir1 register (for pio8). clearing any bit con?ures the corresponding pio line as an in put while setting the bit con?ures it as an output. by default, following a reset, all bits of piodir0 and piodir1 are cleared con?uring the pio lines as inputs. th e data of the pio0 to pio8 lines is controlled by the piodata0 re gister (for pio0 to pio7) and bit 0 of the pi odata1 register (for pio8). these registers can be used to read data from those pio lines con?ured as inputs and write data to those con?ured as outputs. any of the nine pins that have been con?ured for pio functionality can be made to act as an interrupt source by setting the appropriate bit of the piointen0 register (for pio0 to pio7) or the piointen1 register (for pio8). in or der to act as an interrupt source, the pin must also be con?ured as an input. an interrupt is generated upon a change of state (low-to-high transition or high-to-low transition) on any input that has been con?ured as an interrupt source. following a change of state event on any such input, the corresponding bit is set in the pioflag0 register (for pio0 to pio7), and pioflag1 (for pio8) and a common pio interrupt is gener- ated. reading the pioflag0 and pioflag1 registers permits determining the interrupt source. reading the pioflag0 and pioflag1 registers automatically clears all bits of the registers.
admcf326 ?21? rev. b following power-on or reset, all bits of piointen0 and piointen1 are cleared so that no interrupts are enabled. each pio line has an internal pull-down resistor so that follow- ing power-on or reset, all nine lines are con?ured as input pios and will be read as logic lows if left unconnected. multiplexing of pio lines the pio0?io5 lines are multiplexed on the admcf326 with t he functional lines of the serial port, sport1. although the pioselect register permits individual selection of the func- t ionality of each pin, certain restrictions apply when using sport1 for serial communications. in general, when transmitting and receiv ing data on the dti and drib pins, respectively, the pio0/tfs1 and pio5/rfs1 pins must also be selected for sport (tfs1 and rfs1) functional- ity even if unframed communication is implemented. therefore, when using sport1 for any type of serial communication, the minimal setting for pioselect is 0xd8 (i.e., select dti, drib, rfs1 and tfs1, select pio7, pio6, pio4, pio3 as digital i/o). if the serial port communications use an internally generated sclk1, the pio3/sclk1 pin may be used as a general-purpose pio line. when external sclk mode is selected, the pio/sclk1 pin must be enabled as sclk1 (pioselect [3] = 0). when the drib data receive line of sport1 is selected as the data receive line (modectrl [4] = 1), the pio4/dria line may be used as a general-purpose pio pin. when the dria data receive line of sport1 is selected as the data receive line (modectrl [4] = 0), the pio2/drib line may be used as a general-purpose pio pin. t he functionality of the pio6/clkout, pio7/aux1, and pio8/aux0 pins may be selected on a pin-by-pin basis as desired. pio registers the con?uration of all registers of the pio system is shown at the end of the data sheet. interrupt control the admcf326 can respond to 16 different interrupt sources, some of which are generated by internal dsp core interrupts and others from the motor control peripherals. the dsp core interrupts include the following: a peripheral (or irq2) interrupt a sport1 receive (or irq0 ) and a sport1 transmit (or irq1 ) interrupt tw o software interrupts an interval timer time-out interrupt the interrupts generated by the motor control peripherals include: a pwmsync interrupt nine programmable input/output (pio) interrupts a pwm trip interrupt t he core interrupts are internally prioritized and individually maskable. all peripheral interrupts are multiplexed into the dsp core through the peripheral ( irq2 ) interrupt . th e pwmsync interrupt is triggered by a low-to-high tran- sition on the pwmsync pulse. the pwmtrip interrupt is triggered on a high-to-low transition on the pwmtrip pin, or by writ ing to the pwmswt register. a pio i nterrupt is dete cted on any change of state (high-to-low or low-to-high) on the pio lines. t he admcf326 interrupt control system is con?ured and c ontrolled by the ifc, imask, and icntl registers of the dsp core and by the irqflag register for the pwmsync and pwmtrip interrupts. pio interrupts are enabled and disabled by the piointen0 and piointen1 registers. table ix. interrupt vector addresses interrupt source interrupt vector address pwmtrip 0x002c (highest priority) peripheral interrupt ( irq2 ) 0x0004 pwmsync 0x000c pio 0x0008 software interrupt 1 0x0018 software interrupt 0 0x001c sport1 transmit interrupt (or irq1) 0x0020 sport1 receive interrupt (or irq0) 0x0024 timer 0x0028 (lowest priority) interrupt masking i nterrupt masking (or disabling) is controlled by the imask register of the dsp core. this register contains individual bits that must be set to enable the various interrupt sources. if any perip heral interrupt (pwmsync, pwmtrip , or pio) is to be enabled, the irq2 interrupt enable bit (bit 9) of the imask register must be set. the con?uration of the imask register of the admcf326 is shown at the end of the data sheet. interrupt con?uration the ifc and icntl registers of the dsp core control and con- ?ure the interrupt controller of the dsp core. the ifc register is a 16-bit register that may be used to force and/or clear any of the eight dsp interrupts. bits 0 to 7 of the ifc register may be used to clear the dsp interrupts while bits 8 to 15 can be used to force a corresponding interrupt. writing to bits 11 and 12 in ifc is the only way to create the two software interrupts. th e icntl register is used to con?ure the sensitivity (edge or level) of the irq0 , irq1 , and irq2 interrupts and to enable/ disable interrupt nesting. setting bit 0 of icntl con?ures the irq0 as edge-sensitive, while clearing the bit con?ures it for level-sensitive. bit 1 is used to con?ure the irq1 interrupt. table viii. auxiliary pwm timer auxiliary pwm timers parameter test conditions min typ max unit resolution 8 bits pwm frequency 10 mhz clkin 0.039 mhz
admcf326 ?22? rev. b bit 2 is used to con?ure the irq2 interrupt. it is recommended that the irq2 interrupt always be con?ured as level-sensitive to ensure that no peripheral interrupts are lost. setting bit 4 of the icntl register enables interrupt nesting. the con?ura- tion of both the ifc and icntl registers is shown at the end of the data sheet. interrupt operation f ollowing a reset, the rom code on the admcf326 must copy a default interrupt vector table into program memory ram from address 0x0000 to 0x002f. since each interrupt source has a dedicated four-word space in this vector table, it is possible to code short interrupt service routines (isr) in place. alternatively, it may be necessary to insert a jump instruction to the appropriate start address of the interrupt service routine if more memory is required for the isr. when an interrupt occurs, the program sequencer ensures that t here is no latency (beyond synchronization delay) when pro- cessing unmasked interrupts. in the case of the timer, sport1, and software interrupts, the interrupt controller automatically jumps to the appropriate location in the interrupt vector table. at this point, a jump instruction to the appropriate isr is required. motor control peripheral interrupts are slightly different. when a peripheral interrupt is detected, a bit is set in the irqflag regis- ter for pwmsync and pwmtrip, or in the pioflag0 or pioflag1 registers for a pio interrupt, and the irq2 line is pulled low until all pending interrupts are acknowledged. t he dsp software must determine the source of the interrupts by reading irqflag register. if more than one interrupt occurs simultaneously, the higher priority interrupt service routine is executed. reading the irqflag register clears the pwmtrip and pwmsync bits and acknowledges the interrupt, thus allow- ing further interrupts when the isr exits. a user? pio interrupt service routine must read the pioflag0 a nd pioflag1 registers to determine which pio port is the so urce of the interrupt. reading registers pioflag0 and pi oflag1 clears all bits in the registers and acknowledges th e interrupt, thus allowing further interrupts after the isr exits. t he con?uration of all these registers is shown at the end of the data sheet. system controller the system controller block of the admcf326 performs the following functions: 1. manages the interface and data transfer between the dsp core and the motor control peripherals 2. handles interrupts generated by the motor control peripherals and generates a dsp core interrupt signal irq2 3. controls the adc multiplexer select lines 4. enables pwmtrip and pwmsync interrupts 5. c ontrols the multiplexing of the sport1 pins to select ei ther dr1a or dr1b data receive pins. it also allows con?ura- tion of sport1 as a uart interface. 6. controls the pwm single/double update mode 7. controls the adc conversion time modes 8. controls the auxiliary pwm operation mode 9. c ontains a status register (sysstat) that indicates the state of the pwmtrip pin, the watchdog timer, and the pwm timer 10. p erforms a reset of the motor control peripherals and con trol registers following a hardware, software, or watchdog initi- ated reset sport1 control both data receive pins are multiplexed internally into the single data receive input of sport1 as shown in figure 18. two con- trol bits in the modectrl register control the state of the s port1 pins by manipulating internal multiplexers in the admcf326. dsp core sport1 pio4/dr1a pio2/dr1b pio0/tfs1 pio5/rfs1 pio3/sclk1 modectrl (5 . . . 4) uarten dr1sel dt1 dr1 tfs1 rfs1 sclk1 fl1 admcf326 pio1/dt1 figure 18. internal multiplexing of sport1 pins bit 4 of the modectrl register (dr1sel) selects between the two data receive pins. setting bit 4 of modectrl connects pin dr1b to the internal data receive port dr1 of sport1. clearing bit 4 connects dr1a to dr1. setting bit 5 of the modectrl register (sport1 mode) con- ?ures the serial port for uart mode. in this mode, the dr1 and rfs1 pins of the internal serial port are connected together. addi- tionally, setting the sport1 mode bit connects the fl1 flag of the dsp to the external pio5/rfs1 pin. flag pins the admcf326 provides flag pins. the alternate con?uration of sport1 includes a flag in (fi) and flag out (fo) pin. this alternate con?uration of sport1 is selected by bit 10 of t he dsp system control register, syscntl at data memory address 0x3fff. in the alternate con?uration, the dr1 pin ( either dr1a or dr1b depending upon the state of the dr1sel bit) becomes the fi pin and the dt1 pin becomes the fo pin. additionally, rfs1 is con?ured as the irq0 interrupt input and tfs1 is con?ured as the irq1 interrupt. the serial port clock, sclk1, is still available in the alternate con?uration. development tools users are recommended to obtain the admcf326-evalkit from analog devices. the tool kit contains everything required to quickly and easily evaluate and develop applications using the admcf326 and admc326 dsp motor controllers. please contact your adi sales representative for ordering information.
admcf326 ?23? rev. b table x. peripheral register map address (hex) name bits used function 0x2000 adc1 [15 . . . 4] adc results for v1 0x2001 adc2 [15 . . . 4] adc results for v2 0x2002 adc3 [15 . . . 4] adc results for v3 0x2003 adcaux [15 . . . 4] adc results for vaux 0x2004 piodir0 [7 . . . 0] pio0 . . . 7 pins direction setting 0x2005 piodata0 [7 . . . 0] pio0 . . . 7 pins input/output data 0x2006 piointen0 [7 . . . 0] pio0 . . . 7 pins interrupt enable 0x2007 pioflag0 [7 . . . 0] pio0 . . . 7 pins interrupt status 0x2008 pwmtm [15 . . . 0] pwm period 0x2009 pwmdt [9 . . . 0] pwm dead time 0x200a pwmpd [9 . . . 0] pwm pulse deletion time 0x200b pwmgate [9 . . . 0] pwm gate drive con?uration 0x200c pwmcha [15 . . . 0] pwm channel a pulsewidth 0x200d pwmchb [15 . . . 0] pwm channel b pulsewidth 0x200e pwmchc [15 . . . 0] pwm channel c pulsewidth 0x200f pwmseg [8 . . . 0] pwm segment select 0x2010 auxch0 [7 . . . 0] aux pwm output 0 0x2011 auxch1 [7 . . . 0] aux pwm output 1 0x2012 auxtm0 [7 . . . 0] auxiliary pwm frequency value 0x2013 auxtm1 [7 . . . 0] auxiliary pwm frequency value/offset 0x2014 reserved 0x2015 modectrl [8 . . . 0] mode control register 0x2016 sysstat [3 . . . 0] system status 0x2017 irqflag [1 . . . 0] interrupt status 0x2018 wdtimer [15 . . . 0] watchdog timer 0x2019 . . . 43 reserved 0x2044 piodir1 [0] pio8 pin direction setting 0x2045 piodata1 [1 . . . 0] pio8 data and mode control 0x2046 piointen1 [0] pio8 pin interrupt enable 0x2047 pioflag1 [0] pio8 pin interrupt status 0x2048 reserved 0x2049 pioselect [7 . . . 0] pio0 to pio7 mode select 0x204a . . . 5f reserved 0x2060 pwmsyncwt [7 . . . 0] pwmsync pulsewidth 0x2061 pwmswt [0] pwm s/w trip bit 0x2062 . . . 67 reserved 0x2068 iconst_trim [2. . .0] iconst_trim 0x2069 . . . 70 reserved 0x2080 fmcr [15. . .0] flash memory control register 0x2081 fmar [11. . .0] flash memory address register 0x2082 fmdrh [13. . .0] flash memory data register high 0x2083 fmdrl [15. . .0] flash memory data register low 0x2084 . . . ff reserved
admcf326 ?24? rev. b table xi. dsp core registers address name bits function 0x3fff syscntl [15 ...0] system control register 0x3ffe memwait [15 ...0] mem ory wait state control register 0x3ffd tperiod [15 ...0] in terval timer period register 0x3ffc tcount [15 ...0] in terval timer count register 0x3ffb tscale [7 ...0] in terval timer scale register 0x3ffa . . . f3 reserved 0x3ff2 sport1_ctrl_reg [15 ...0] sp ort1 control register 0x3ff1 sport1_sclkdiv [15 ...0] sp ort1 clock divide register 0x3ff0 sport1_rfsdiv [15 ...0] sp ort1 receive frame sync divide 0x3fef sport1_autobuf_ctrl [15 ...0] sp ort1 autobuffer control register
admcf326 ?25? rev. b flash memory control register 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0x2080 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 bootefromeflashecode 0 flash memory address register 0 0 0 0 0 0 0 00 0 0 00 0 0 0 0x2081 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved always read 0 address 11e0 flash memory data register low (fmdrl) 0 0 0 0 0 0 0 00 0 0 00 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 reserved always read 0 0x2083 status 5e0 data 7e0 flash memory data register high (fmdrh) 0 0 0 0 0 0 0 00 0 0 00 0 0 0 15 14 13 12 11 10 98 7654 3210 0x2082 data 23e8 most significant bit is on the left. for example, data23 is bit 15 of fmdrh. figure 19. con?guration of flash memory registers default bit values are shown; if no value is shown, the bit ?ld is unde?ed at reset. reserved bits are shown on a gray ?ld? hese bits should always be written as shown.
admcf326 ?26? rev. b 15 14 13 12 11 10 98 76 54 3210 000 00000 0000 00 00 t d = 2  pwmdt f clkout seconds pwmdt (r/w) dm (0x2009) pwmdt f pwm = pwmtm (r/w) dm (0x2008) pwmtm 2  pwmtm f clkout 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 = enable 1 = disable ch output disable cl output disable bh output disable bl output disable ah output disable al output disable 0 = no crossover 1 = crossover a channel crossover b channel crossover c channel crossover dm (0x200f) pwmseg (r/w) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0000 000 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 010 00111 00000000 pwmsyncwt (r/w) dm (0x2060) pwmsyncwt t pwmsync, on = pwmsyncwt + 1 f clkout 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 000 00000 0000 00 0 0 pwmswt (r/w) dm (0x2061) figure 20. con?guration of pwm registers default bit values are shown; if no value is shown, the bit ?ld is unde?ed at reset. reserved bits are shown on a gray ?ld? hese bits should always be written as shown.
admcf326 ?27? rev. b 0 0 0 0 0 0 0 0 0 0 low side gate chopping 0 = disable 1 = enable high side gate chopping dm (0x200b) gdclk gate drive chopping frequency pwmgate (r/w) pwmpd (r/w) dm (0x200a) pwmpd pwmcha (r/w) pwm channel a duty cycle dm (0x200c) pwmchb (r/w) pwm channel b duty cycle dm (0x200d) pwmchc (r/w) dm (0x200e) pwm channel c duty cycle t min = pwmpd f clkout seconds f chop = 4  (gdclk + 1) f clkout 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 00 0 figure 21. con?guration of additional pwm registers default bit values are shown; if no value is shown, the bit ?ld is unde?ed at reset. reserved bits are shown on a gray ?ld? hese bits should always be written as shown.
admcf326 ?28? rev. b dm (0x2004) 0 = input 1 = output piodir0 (r/w) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2044) piodir1 (r/w) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2005) 0 = low level 1 = high level piodata0 (r/w) 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2045) pio8 data piodata1 (r/w) 0 0 0 00 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2049) pioselect (r/w) 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 pio8/aux0 mode 0 0 0 0 1 1 1 11 1 1 1 1 0 0 0 = tfs1 1 = pio0 0 = lo 1 = hi 0 = aux0 1 = pio8 pio0 e pio7 pio8 pio0 e pio7 0 = dt1 1 = pio1 0 = dr1b 1 = pio2 0 = sclk1 1 = pio3 0 = aux1 1 = pio7 0 = clkout 1 = pio6 0 = rfs1 1 = pio5 0 = dr1a 1 = pio4 0 = input 1 = output figure 22. con?guration of pio registers default bit values are shown; if no value is shown, the bit ?ld is unde?ed at reset. reserved bits are shown on a gray ?ld? hese bits should always be written as shown.
admcf326 ?29? rev. b pioflag0 (r) 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 00 0 0 0 pioflag1 (r) 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 00 0 0 0 dm (0x2007) 0 = no interrupt 1 = interrupt flagged dm (0x2047) 0 = no interrupt 1 = interrupt flagged 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 piointen0 (r/w) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2006) 0 = interrupt disable 1 = interrupt enable 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 piointen1 (r/w) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2046) 0 = interrupt disable 1 = interrupt enable pio0 e pio7 pio8 pio0 e pio7 pio8 figure 23. con?guration of additional pio registers default bit values are shown; if no value is shown, the bit ?ld is unde?ed at reset. reserved bits are shown on a gray ?ld? hese bits should always be written as shown.
admcf326 ?30? rev. b auxtm0 (r/w) 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 auxch1 (r/w) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2011) auxch0 (r/w) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2010) dm (0x2012) auxtm1 (r/w) 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2013) aux1 period = 2  (1 + auxtm1)  t ck offset = 2  (1 + auxtm1)  t ck t on, aux0 = 2  (auxch0)  t ck t on, aux1 = 2  (auxch1)  t ck aux0 period = 2  (auxtm0 + 1)  t ck figure 24. con?guration of aux registers default bit values are shown; if no value is shown, the bit ?ld is unde?ed at reset. reserved bits are shown on a gray ?ld? hese bits should always be written as shown.
admcf326 ?31? rev. b 0 0 0 0d m (0x2000) adc1 (r) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 dm (0x2001) adc2 (r) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 dm (0x2002) adc3 (r) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 dm (0x2003) adcaux (r) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dm (0x2068) iconst_trim (r/w) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 iconst min = bits 0 e 2 cleared. iconst max = bits 0 e 2 set. 0 0 0 00 0 0 00 0 0 00 0 0 0 figure 25. con?guration of additional aux registers default bit values are shown; if no value is shown, the bit ?ld is unde?ed at reset. reserved bits are shown on a gray ?ld? hese bits should always be written as shown.
admcf326 ?32? rev. b 0 = sport 1 = uart sport1 mode select 0 = dr1a 1 = dr1b sport1 data receive select 0 = disable 1 = enable pwmsync interrupt 0 = disable 1 = enable pwmtrip iterrpt 0 0 0 0 0 0 00 0 0 0 ssstt r 1 1 1 12 11 10 2 1 0 0w 1i m0201 0rm 1wtreset rre pwmtrip pistts wt stts pwmtimer stts 0 1stpwm e 1 2pwm e 0 0 00 0 0 0 00 0 0 00 0 0 0 metrrw m0201 0siepteme 1epteme 1 1 1 12 11 10 2 1 0 mtr 000 011 102 11 iir pwmseet 0setme 1iepeetme ter seet 0irte 1trte 0 0 00 0 0 0 00 0 0 0 1 1 1 12 11 10 2 1 0 0 0 00 irqr pwmtrip iterrpt pwmsiterrpt m0201 0 0 0 0 0 0 00 0 0 00 0 0 00 1 1 1 12 11 10 2 1 0 wtimerw m0201 01 0iterrpt 1iterrpt rre pwmpte meseet 2 sr default bit values are shown; if no value is shown, the bit ?ld is unde?ed at reset. reserved bits are shown on a gray ?ld? hese bits should always be written as shown.
admcf326 ?33? rev. b sport1 receive or irq0 i iterrptre iterrpter 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 timer stwre0 stwre1 irq2 timer stwre0 stwre1 irq2 spreister 1 1 1 12 11 10 2 1 0 sprt1trsmitr irq1 sprt1reeier irq0 sprt1trsmitr irq1 1 1 0 0 0 irq0 sesitiit 0ee 1ee it irq1 sesitiit irq2 sesitiit iterrptesti 0ise 1ee spreister 210 imsrw periperr irq2 timer sprt1reeie r irq0 sprt1trsmit r irq1 stwre0 stwre1 0 0 0 0 0 0 0 00 0 0 00 1 1 0 spreister 0ise ms 1ee 0ise ms 1ee 1 1 1 12 11 10 2 1 0 2 ir default bit values are shown; if no value is shown, the bit ?ld is unde?ed at reset. reserved bits are shown on a gray ?ld? hese bits should always be written as shown.
admcf326 ?34? rev. b 1 1 0 0 0 0 00 0 11 1 1 1 sport1 configure 0 = fi, fo, irq0, irq1, sclk 1 = serial port sport1 enable 0 = disabled 1 = enabled syscntl (r/w) dm (0x3fff) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 pwait program memory wait states the rom monitor writes 0x8000 to this register figure 28. con?guration of registers
admcf326 C35C rev. b outline dimensions 28-lead standard small outline package [soic] wide-body (r-28) dimensions shown in millimeters and (inches) controlling dimensions are in millimeters; inch dimensions (in parentheses) are rounded-off millimeter equivalents for reference only and are not appropriate for use in design compliant to jedec standards ms-013ae 0.32 (0.0126) 0.23 (0.0091) 8 0 0.75 (0.0295) 0.25 (0.0098) 45 1.27 (0.0500) 0.40 (0.0157) seating plane 0.30 (0.0118) 0.10 (0.0039) 0.51 (0.0201) 0.33 (0.0130) 2.65 (0.1043) 2.35 (0.0925) 1.27 (0.0500) bsc 28 15 14 1 18.10 (0.7126) 17.70 (0.6969) 10.65 (0.4193) 10.00 (0.3937) 7.60 (0.2992) 7.40 (0.2913) pin 1 coplanarity 0.10 28-lead plastic dual-in-line package [pdip] (n-28) dimensions shown in millimeters and (inches) 4.95 (0.1949) 3.18 (0.1252 ) 0.38 (0.0150) 0.20 (0.0079) 15.87 (0.6248) 15.24 (0.6000) 28 1 14 15 pin 1 14.73 (0.5799) 12.32 (0.4850) 39.70 (1.5630) 35.10 (1.3819) seating plane 1.52 (0.0598) 0.38 (0.0150) 6.35 (0.2500) max 0.56 (0.0220) 0.36 (0.0142) 5.05 (0.1988) 3.18 (0.1252) 3.81 (0.1500) min 2.54 (0.1000) bsc 1.77 (0.0697) max controlling dimensions are in millimeters; inch dimensions (in parentheses) are rounded-off millimeter equivalents for reference only and are not appropriate for use in design admc326?evision history location page 8/29?ata sheet changed from rev. a to rev. b. updated outline dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 8/02?ata sheet changed from rev. 0 to rev. a. edits to figure 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 edits to figure 28 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
?36? printed in u.s.a. c00109?0?8/02(b)


▲Up To Search▲   

 
Price & Availability of ADMCF326BRZ

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X